﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    x:Class="C4F.VistaP2P.WPF.Picture.PictureControl"
    Loaded="_PictureControlLoaded"
    >
	<UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Simple Styles.xaml"/>
                <ResourceDictionary Source="BlueResource.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <LinearGradientBrush x:Key="font" EndPoint="0.494,-0.136" StartPoint="0.506,1.136">
                <GradientStop Color="#FFADADAD" Offset="0"/>
                <GradientStop Color="#FFFFFFFF" Offset="1"/>
            </LinearGradientBrush>

            <!-- SimpleButtonFocusVisual is used to show keyboard focus around a SimpleButton control -->
            <Style x:Key="SimpleButtonFocusVisual">
                <Setter Property="Control.Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border>
                                <Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
            <LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
                <GradientStop Color="#EEE" Offset="0.0"/>
                <GradientStop Color="#CCC" Offset="1.0"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0">
                <GradientStop Color="#CCC" Offset="0.0"/>
                <GradientStop Color="#444" Offset="1.0"/>
            </LinearGradientBrush>

            <LinearGradientBrush x:Key="blueGradient" EndPoint="0.468,-0.109" StartPoint="0.481,1.002">
                <GradientStop Color="#FF2F7BD1" Offset="0"/>
                <GradientStop Color="#FF0D3374" Offset="1"/>
            </LinearGradientBrush>

            <!-- Disabled Brushes are used for the Disabled look of each control -->
            <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
	
        	<!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
        	<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}" BasedOn="{x:Null}">
        		<Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/>
        		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
        		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
        		<Setter Property="Template">
        			<Setter.Value>
        				<ControlTemplate TargetType="{x:Type Button}">
					
        					<Grid x:Name="Grid">
						
        						<Rectangle Stroke="#FFFFFFFF" RadiusX="15" RadiusY="15" x:Name="rectangle" StrokeThickness="2" Fill="{DynamicResource blueGradient}"/>
						
        						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" OpacityMask="{x:Null}"/>
						
        						<!-- Content Presenter is where the text content etc is placed by the control -->
        					</Grid>

                            <!--Each state sets a brush on the Border in the template -->
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocused" Value="true"/>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter Property="Fill" TargetName="rectangle">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.496,1.002" StartPoint="0.453,-0.109">
                                                <GradientStop Color="#FF2F7BD1" Offset="0"/>
                                                <GradientStop Color="#FF0D3374" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
                                <Trigger Property="IsPressed" Value="true">
                                    <Setter Property="Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                                <GradientStop Color="#FFEEEEEE" Offset="0"/>
                                                <GradientStop Color="#FF39CF6B" Offset="1"/>
                                                <GradientStop Color="#FFE7E7E7" Offset="0.202"/>
                                                <GradientStop Color="#FF39CF6B" Offset="0.205"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Fill" TargetName="rectangle">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.468,-0.109" StartPoint="0.481,1.002">
                                                <GradientStop Color="#FF006900" Offset="0"/>
                                                <GradientStop Color="#FF39CF6B" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="true"/>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
                                    <Setter Property="IsEnabled" TargetName="rectangle" Value="False"/>
                                    <Setter Property="Fill" TargetName="rectangle">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                                <GradientStop Color="#FF9C9A9C" Offset="0"/>
                                                <GradientStop Color="#FF393439" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
        			</Setter.Value>
        		</Setter>
        	</Style>

            <LinearGradientBrush x:Key="topBlueGradient" EndPoint="0.0,0" StartPoint="0.0,1.00">
                <GradientStop Color="#FF2F7BD1" Offset="0"/>
                <GradientStop Color="#FF0D3374" Offset="1"/>
            </LinearGradientBrush>
        </ResourceDictionary>
    </UserControl.Resources>
		
	<Grid Width="Auto" Height="Auto" Margin="0,0,0,0">
		
		<Rectangle Stroke="{DynamicResource font}" RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="#FF000000"/>
		
		<Grid Height="Auto" Width="Auto" Margin="0,0,0,0" Background="{x:Null}" Grid.Row="3" Grid.Column="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">				
			<Grid.RowDefinitions>
				
				<RowDefinition Height="20"/>
				<RowDefinition Height="*"/>				
				<RowDefinition Height="16"/>				
				<RowDefinition Height="66"/>				
			</Grid.RowDefinitions>            
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="117"/>
			</Grid.ColumnDefinitions>

			
		    
			<Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Grid.ColumnSpan="2" Stroke="#FF000000" Margin="0,0,22.836,0" x:Name="topLeftBlue" Fill="{DynamicResource topBlueGradient}">
				<Rectangle.Clip>
					<PathGeometry>
						<PathFigure IsClosed="True" StartPoint="1,16">
							<BezierSegment Point1="1,7.7157287525381" Point2="7.7157287525381,1" Point3="16,1" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="336,1"/>
							<BezierSegment Point1="344.284271247462,1" Point2="351,7.7157287525381" Point3="351,16" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="351,128"/>
							<BezierSegment Point1="351,136.284271247462" Point2="344.284271247462,143" Point3="336,143" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="16,143"/>
							<BezierSegment Point1="7.7157287525381,143" Point2="1,136.284271247462" Point3="1,128" IsSmoothJoin="True"/>
						</PathFigure>
					</PathGeometry>
				</Rectangle.Clip>
			</Rectangle>
		
			<Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Stroke="{x:Null}" x:Name="topRightBlue" ClipToBounds="False" StrokeEndLineCap="Flat" RenderTransformOrigin="0.5,0.5" Margin="180,0,0,0" Grid.ColumnSpan="2" Stretch="Fill" Fill="{DynamicResource topBlueGradient}">
				<Rectangle.Clip>
					<PathGeometry>
						<PathFigure IsClosed="True" StartPoint="1,16">
							<BezierSegment Point1="1,7.7157287525381" Point2="7.7157287525381,1" Point3="16,1" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="336,1"/>
							<BezierSegment Point1="344.284271247462,1" Point2="351,7.7157287525381" Point3="351,16" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="351,128"/>
							<BezierSegment Point1="351,136.284271247462" Point2="344.284271247462,143" Point3="336,143" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="16,143"/>
							<BezierSegment Point1="7.7157287525381,143" Point2="1,136.284271247462" Point3="1,128" IsSmoothJoin="True"/>
						</PathFigure>
					</PathGeometry>
				</Rectangle.Clip>
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="-1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		
			<Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Stroke="{x:Null}" x:Name="topCenterBlue" Fill="{DynamicResource topBlueGradient}" HorizontalAlignment="Stretch" Width="Auto" Margin="60,0,40,0" Grid.ColumnSpan="2"/>

			<Label Focusable="False" Margin="10,-3.166,0,0" Content="Picture" BorderBrush="{x:Null}" HorizontalAlignment="Left" Width="Auto" x:Name="Title" Padding="0,0,0,0" Background="{x:Null}" Foreground="{DynamicResource font}" FontSize="15" VerticalContentAlignment="Top"/>		
			<Path VerticalAlignment="Bottom" Height="2" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="2" Grid.ColumnSpan="2" Data="M-0.5,30 L351.5,30" Margin="0,0,0,0"/>
		
			
			<Label Focusable="False" Margin="8,0,0,0" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="Auto" Height="Auto" FontSize="10" d:LayoutOverrides="GridBox" x:Name="lblFileName" Grid.Row="2" Padding="0,0,0,0" Grid.RowSpan="1" VerticalAlignment="Top" Grid.Column="1"/>		
			<Label Focusable="False" Margin="0,0,20.836,2.714" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" Width="Auto" Height="Auto" FontSize="12" x:Name="lblFileTitle" Padding="0,0,0,0" d:LayoutOverrides="Width, Height" Grid.Column="1" Grid.Row="1" VerticalAlignment="Bottom"/>
		
			<Border Margin="10,10,10,10" Grid.Row="1" Grid.RowSpan="3" CornerRadius="0,0,0,0" BorderThickness="0,0,0,0">
		
				<Image x:Name="image1" OpacityMask="{x:Null}" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Width="Auto" Height="Auto" >
					<Image.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0.619"/>
							<TranslateTransform X="0.022642569674303559" Y="0.45236490701906074"/>
						</TransformGroup>
					</Image.RenderTransform>
				</Image>
		
			</Border>
		
			<Button x:Name="btnSendPicture" IsEnabled="False" Style="{DynamicResource ButtonStyle1}" Content="Send" Foreground="{DynamicResource font}" Margin="0,0,10,10" Width="55" FontSize="14" HorizontalAlignment="Right" Grid.RowSpan="2" Height="50" Grid.Row="3" Grid.Column="1" VerticalAlignment="Bottom"/>
		
		</Grid>
		
		<Rectangle Stroke="{DynamicResource font}" RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="{x:Null}"/>
		
	</Grid>
		
</UserControl>
